using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class Press_PressManagerMap : EntityTypeConfiguration<Press_PressManager>
    {
        public Press_PressManagerMap()
        {
            // Primary Key
            this.HasKey(t => t.Pressmanager_id);

            // Properties
            this.Property(t => t.locale)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.headline_cs)
                .HasMaxLength(80);

            this.Property(t => t.headline_en)
                .HasMaxLength(240);

            this.Property(t => t.content_cs)
                .HasMaxLength(5000);

            this.Property(t => t.content_en)
                .HasMaxLength(5000);

            this.Property(t => t.articleimage_idstr)
                .HasMaxLength(20);

            this.Property(t => t.imagealt)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Press_PressManager");
            this.Property(t => t.Pressmanager_id).HasColumnName("Pressmanager_id");
            this.Property(t => t.locale).HasColumnName("locale");
            this.Property(t => t.headline_cs).HasColumnName("headline_cs");
            this.Property(t => t.headline_en).HasColumnName("headline_en");
            this.Property(t => t.displaydate).HasColumnName("displaydate");
            this.Property(t => t.publishdate).HasColumnName("publishdate");
            this.Property(t => t.content_cs).HasColumnName("content_cs");
            this.Property(t => t.content_en).HasColumnName("content_en");
            this.Property(t => t.articleimage_id).HasColumnName("articleimage_id");
            this.Property(t => t.logoimage_id).HasColumnName("logoimage_id");
            this.Property(t => t.articleimage_idstr).HasColumnName("articleimage_idstr");
            this.Property(t => t.logoimage_en_id).HasColumnName("logoimage_en_id");
            this.Property(t => t.startdate).HasColumnName("startdate");
            this.Property(t => t.enddate).HasColumnName("enddate");
            this.Property(t => t.showrate).HasColumnName("showrate");
            this.Property(t => t.imagealt).HasColumnName("imagealt");
        }
    }
}
